{extend name="public/layer/main" /}
{block name="css"}{/block}
{block name="style"}{/block}
{block name="js"}{/block}
{block name="script"}{/block}
{block name="module"}{$globals.module}{/block}
{block name="controller"}{$globals.controller}{/block}
{block name="action"}{$globals.action}{/block}
{block name="desc"}{$globals.desc}{/block}
{block name="content"}
<div class="box box-primary">
	<div class="box-header with-border">
		<h3 class="box-title">搜索：</h3>
	</div>
	<form class="form-horizontal" action="{:url('page')}" method="get">
	<div class="box-body">
		<div class="form-group">
			<label class="col-md-1 control-label">名称</label>
			<div class="col-md-2">
				<input type="text" class="form-control" name="name" value="{$request.name|default=''}" placeholder="请输入名称" autocomplete="off">
			</div>
			<label class="col-md-1 control-label">状态</label>
			<div class="col-md-2">
				<select class="form-control" rel-action="select" name="status">
					<option value="">不限</option>
					{volist name="data.status" id="item"}
					{if @$request.status == $key && is_numeric($request.status)}
					<option value="{$key}" selected="selected">{$item}</option>
					{else /}
					<option value="{$key}">{$item}</option>
					{/if}
					{/volist}
				</select>
			</div>
		</div>
	</div>
	<div class="box-footer">
		<div class="col-md-offset-1">
			<button type="submit" class="btn btn-default">查询</button>
			<a class="btn btn-default" href="{:url('page')}">重置</a>
		</div>
	</div>
	</form>
</div>
<div class="box box-primary">
	<div class="box-header with-border">
		<h3 class="box-title"></h3>
		<div class="box-tools">
			<a class="btn btn-default" href="{:url('form')}">
				<i class="fa fa-file-text"></i>
				新增
			</a>
		</div>
	</div>
	<div class="box-body table-responsive">
		<table class="table table-bordered table-striped table-hover">
			<tbody>
				{notempty name="data.data"}
				<tr>
					<th class="text-center">编号</th>
					<th class="text-center">状态</th>
					<th class="text-center">操作</th>
				</tr>
				{volist name='data.data' id='items'}
				<tr>
					<td class="text-center">{$items.id}</td>
					<td class="text-center">{$items.status_map}</td>
					<td class="text-center">
						<a href="{:url('detail',['id' => $items['id']])}">详情</a>
						<a href="{:url('edit',['id' => $items['id']])}">编辑</a>
						<a href="{:url('delete',['id' => $items['id']])}" rel-action="delete">删除</a>
					</td>
				</tr>
				{/volist}
				{else /}
				<tr>
					<td>暂无符合条件记录</td>
				</tr>
				{/notempty}
			</tbody>
		</table>
	</div>
	{notempty name="data.data"}
	<div class="box-footer clearfix">
		{$data.data->render()|raw}
	</div>
	{/notempty}
</div>
{/block}